Skip to content

[Feature] Add Highlight active users feature#542

Open
mltbnz wants to merge 17 commits into
mainfrom
feature/outlier-filter
Open

[Feature] Add Highlight active users feature#542
mltbnz wants to merge 17 commits into
mainfrom
feature/outlier-filter

Conversation

@mltbnz

@mltbnz mltbnz commented May 10, 2026

Copy link
Copy Markdown
Member

πŸ“ Docs

πŸ“² What

Introduces group detection ("Highlight active riders") plus a "What's New" onboarding sheet, consolidates Observation Mode, and adds a local development environment.

Highlight active riders (group detection)

  • Detects riders travelling together and highlights them on the map; riders outside a group stay visible but de-emphasized.
  • Rider dots now have three clear states (RiderAnnotationView):
    • Highlighting off β†’ all riders neutral (.label), full size
    • Highlighting on, in a group β†’ brand color, full size
    • Highlighting on, not in a group β†’ gray, shrunk
  • New Highlight active riders toggle in Settings (userSettings.highlightActiveRiders).
  • Fixes a bug where new annotations showed the wrong color until the next fetch β€” the map coordinator's parent snapshot wasn't refreshed in updateUIView.

"What's New" sheet

  • Shown once per user β€” on every fresh install (onboarding) and when updating to the announced release (AppFeature.whatsNewVersion), gated by lastSeenWhatsNewVersion and an injectable appVersion dependency.
  • Lets users toggle Highlight active riders and Observation Mode directly, with a live hero image that previews the highlight on/off.

Observation Mode consolidation

  • Removed the launch-time observation-mode alert (and its Destination.alert plumbing + didShowObservationModePrompt); the toggle now lives in the What's New sheet and Settings.
  • Corrected the copy: Observation Mode is for people following a ride without taking part (passengers, drivers, onlookers) so their location isn't shared as a rider.

Styleguide

  • CMButtonStyle now uses a tinted, interactive Liquid Glass capsule on iOS 26 (solid brand fill below) and a more prominent font.

Local development environment

  • A Critical Maps (Local) scheme / Debug Local build configuration points the app at a local mock server via an injectable ServerConfiguration (host/scheme/port + poll interval); production is the untouched default. ATS exception added for localhost. (The mock server itself lives in a separate repo.)

Localization & tests

  • New/updated strings across all 9 locales (regenerated L10n.swift).
  • Added/updated tests: RiderActivityFilterTests, RiderAnnotationUpdateClientTests, and AppFeatureTests (What's New gating).

πŸ€” Why

  • On a busy map it's hard to tell where actual groups are versus stray/solo riders β€” highlighting groups makes the ride legible.
  • These opt-in features were only discoverable in Settings; the What's New sheet surfaces them on install/update.
  • The old observation-mode alert was intrusive and its copy was misleading; folding the toggle into the sheet (and fixing the wording) is clearer and keeps non-participants from being counted as riders.
  • We needed to develop the live map against realistic ride data without depending on the production API.

πŸ‘€ See

Before πŸ› After πŸ¦‹
highlighting off highlighting on (groups in brand color, others dimmed)
(screenshot) (screenshot)

♿️ Accessibility

  • Works with VoiceOver
  • Supports Dynamic Type

Already handled: feature toggles use system Toggle (each keeps its localized title as the VoiceOver label via labelsHidden); text uses Dynamic Type system fonts; the hero image is accessibilityHidden; rider dot colors use dynamic system colors (.label/.systemGray) so they adapt to light/dark. Please verify VoiceOver/Dynamic Type on device before ticking.

@mltbnz mltbnz requested a review from a team as a code owner May 10, 2026 16:06
@mltbnz mltbnz changed the title WIP [FEATURE] Add Outlier Filter May 11, 2026
@mltbnz mltbnz self-assigned this May 11, 2026
@mltbnz mltbnz changed the title [FEATURE] Add Outlier Filter [FEATURE] Add Highlight active users feature Jun 5, 2026
@mltbnz mltbnz changed the title [FEATURE] Add Highlight active users feature [Feature] Add Highlight active users feature Jun 9, 2026
mltbnz added 3 commits June 9, 2026 16:09
# Conflicts:
#	CriticalMapsKit/Sources/L10n/Resources/de.lproj/Localizable.strings
#	CriticalMapsKit/Sources/L10n/Resources/en.lproj/Localizable.strings
#	CriticalMapsKit/Sources/L10n/Resources/es.lproj/Localizable.strings
#	CriticalMapsKit/Sources/L10n/Resources/fr.lproj/Localizable.strings
#	CriticalMapsKit/Sources/L10n/Resources/it.lproj/Localizable.strings
#	CriticalMapsKit/Sources/L10n/Resources/pl.lproj/Localizable.strings
#	CriticalMapsKit/Sources/L10n/Resources/pt-BR.lproj/Localizable.strings
#	CriticalMapsKit/Sources/L10n/Resources/pt-PT.lproj/Localizable.strings
#	CriticalMapsKit/Sources/L10n/Resources/tr.lproj/Localizable.strings
#	CriticalMapsKit/Sources/MapFeature/MapView.swift
#	CriticalMapsKit/Sources/SharedModels/UserSettings.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant